package top.lingkang.finalgateway.core;

import cn.hutool.core.io.FileUtil;
import org.jetbrains.annotations.NotNull;

import java.io.File;

/**
 * @author lingkang
 * Created by 2024/5/1
 */
public class StaticFile extends File {
    private final String suffix;

    public StaticFile(@NotNull String pathname) {
        super(pathname);
        suffix = "." + FileUtil.getSuffix(pathname);
    }

    /**
     * 获取文件后缀
     *
     * @return 文件后缀: .js、.png等
     */
    public String getSuffix() {
        return suffix;
    }
}
